﻿@model JumpViewModel
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <environment include="Development">
        <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
    </environment>
    <environment exclude="Development">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css"
              asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
              asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute"
              crossorigin="anonymous"
              integrity="sha256-eSi1q2PG6J7g7ib17yAaWMcrr5GrtohYChqibrV7PBE=" />
    </environment>
    <meta name="viewport" content="width=device-width" />
    <title>@Model.Title</title>
</head>
<body class="text-center">
    <div class="mt-3">
        <h4 class="text-danger">提示信息</h4>
        <h5><p>@Model.Message</p></h5>
    </div>
    <hr />
    <div>
        <p><span id="backtime"></span>秒后返回</p>
        <p><a href="@Model.ReturnUrl">返回</a></p>
        <p><a href="/Manage/">返回管理首页</a></p>
    </div>

    <environment include="Development">
        <script src="~/lib/jquery/dist/jquery.js"></script>
        <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.js"></script>
    </environment>
    <environment exclude="Development">
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"
                asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
                asp-fallback-test="window.jQuery"
                crossorigin="anonymous"
                integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=">
        </script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/js/bootstrap.bundle.min.js"
                asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"
                asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
                crossorigin="anonymous"
                integrity="sha256-E/V4cWE4qvAeO5MOhjtGtqDzPndRO1LBk8lJ/PR7CA4=">
        </script>
    </environment>
    <script>
        $(document).ready(function () {
            var backtime = @Model.Time;
            $("#backtime").text(backtime)
            window.setTimeout(function () {
                window.location.href = "@Model.ReturnUrl";
            }, 1000 *@Model.Time);
            window.setInterval(function () {
                $("#backtime").text(--backtime)
            },1000)
        })
    </script>
</body>
</html>
